package a.j;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.net.URL;

public class jb
  implements db
{
  public static final byte a = 0;
  public static final byte b = 1;
  public static final byte c = 2;
  public static final byte d = 3;
  public static final byte e = 4;
  public static final byte f = 5;
  protected pg g;
  private Image h;
  private Color i;
  private Point j;
  private URL k;
  private byte l = 4;
  private AffineTransform m;
  private Graphics2D n;
  public static boolean o;
  
  public jb(pg parampg)
  {
    this.g = parampg;
    this.i = Color.white;
    this.j = new Point(0, 0);
  }
  
  public URL a()
  {
    return this.k;
  }
  
  public pg b()
  {
    return this.g;
  }
  
  public void a(pg parampg)
  {
    this.g = parampg;
  }
  
  public void a(URL paramURL)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramURL == null) {
        throw new NullPointerException("Specified image url is null.");
      }
      if (bool) {}
    }
    else
    {
      if (this.k != null) {
        if (paramURL.toExternalForm().equals(this.k.toExternalForm())) {
          return;
        }
      }
      this.k = paramURL;
    }
    this.h = new ImageIcon(paramURL).getImage();
  }
  
  public void a(Image paramImage)
  {
    this.h = paramImage;
    this.k = null;
  }
  
  public Image c()
  {
    return this.h;
  }
  
  public void a(Color paramColor)
  {
    this.i = paramColor;
  }
  
  public Color d()
  {
    return this.i;
  }
  
  public void a(double paramDouble1, double paramDouble2)
  {
    this.j = new Point((int)paramDouble1, (int)paramDouble2);
  }
  
  public Point e()
  {
    return this.j;
  }
  
  public void a(byte paramByte)
  {
    this.l = paramByte;
  }
  
  public byte f()
  {
    return this.l;
  }
  
  public void a(Graphics2D paramGraphics2D, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Color localColor = paramGraphics2D.getColor();
    AffineTransform localAffineTransform = paramGraphics2D.getTransform();
    a(paramGraphics2D);
    if (!bool2)
    {
      if (this.h != null)
      {
        if (!bool2) {}
        switch (this.l)
        {
        case 4: 
          c(paramGraphics2D);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        case 3: 
          d(paramGraphics2D);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        case 1: 
          e(paramGraphics2D);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        case 2: 
          f(paramGraphics2D);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        case 0: 
          g(paramGraphics2D);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        case 5: 
          b(paramGraphics2D);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        default: 
          n.a("Unknown background rendering mode: " + this.l);
        }
      }
      paramGraphics2D.setColor(localColor);
      paramGraphics2D.setTransform(localAffineTransform);
    }
  }
  
  void a(Graphics2D paramGraphics2D)
  {
    if (this.i != null)
    {
      Rectangle localRectangle = paramGraphics2D.getClipBounds();
      paramGraphics2D.setColor(this.i);
      paramGraphics2D.fillRect(localRectangle.x, localRectangle.y, localRectangle.width, localRectangle.height);
    }
  }
  
  void b(Graphics2D paramGraphics2D)
  {
    int i1 = this.h.getWidth(null);
    int i2 = this.h.getHeight(null);
    paramGraphics2D.drawImage(this.h, this.j.x, this.j.y, null);
  }
  
  void c(Graphics2D paramGraphics2D)
  {
    h(paramGraphics2D);
    int i1 = this.h.getWidth(null);
    int i2 = this.h.getHeight(null);
    paramGraphics2D.drawImage(this.h, this.j.x, this.j.y, null);
  }
  
  void d(Graphics2D paramGraphics2D)
  {
    h(paramGraphics2D);
    int i1 = this.h.getWidth(null);
    int i2 = this.h.getHeight(null);
    int i3 = this.g.getWidth();
    int i4 = this.g.getHeight();
    paramGraphics2D.drawImage(this.h, (i3 - i1) / 2, (i4 - i2) / 2, null);
  }
  
  void e(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    h(paramGraphics2D);
    Rectangle localRectangle = paramGraphics2D.getClipBounds();
    int i1 = this.h.getWidth(null);
    int i2 = this.h.getHeight(null);
    int i3 = -this.j.x + localRectangle.x;
    int i4 = -this.j.y + localRectangle.y;
    int i5 = i3 % i1;
    i3 = localRectangle.x - i5;
    if (!bool2)
    {
      if (i5 != 0) {
        i3 -= i1;
      }
      i5 = i4 % i2;
      i4 = localRectangle.y - i5;
    }
    if (!bool2) {
      if (i5 != 0) {
        i4 -= i2;
      }
    }
    int i6 = i4;
    label216:
    label218:
    do
    {
      if (i6 >= localRectangle.y + localRectangle.height) {
        break;
      }
      int i7 = i3;
      do
      {
        do
        {
          if (i7 >= localRectangle.x + localRectangle.width) {
            break;
          }
          paramGraphics2D.drawImage(this.h, i7, i6, null);
          i7 += i1;
          if (bool2) {
            break label218;
          }
          if (bool1) {
            break label216;
          }
        } while (!bool1);
      } while (bool2);
      i6 += i2;
    } while (!bool1);
  }
  
  void f(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    h(paramGraphics2D);
    Rectangle localRectangle = paramGraphics2D.getClipBounds();
    int i1 = this.h.getWidth(null);
    int i2 = this.h.getHeight(null);
    int i3 = 1;
    int i4 = 0;
    if (i4 < localRectangle.y + localRectangle.height) {
      if (bool2) {}
    }
    label147:
    while (bool2)
    {
      int i5 = i3 != 0 ? 0 : -i1 / 2;
      do
      {
        do
        {
          if (i5 >= localRectangle.x + localRectangle.width) {
            break;
          }
          paramGraphics2D.drawImage(this.h, i5, i4, null);
          i5 += i1;
          if ((!bool2) && (bool1)) {
            break label147;
          }
        } while (!bool1);
      } while (bool2);
      if (!bool2) {}
      i3 = i3 == 0 ? 1 : 0;
      i4 += i2;
      if (!bool1) {
        break;
      }
    }
  }
  
  void g(Graphics2D paramGraphics2D)
  {
    h(paramGraphics2D);
    int i1 = this.g.getWidth();
    int i2 = this.g.getHeight();
    paramGraphics2D.drawImage(this.h, 0, 0, i1, i2, null);
  }
  
  protected void h(Graphics2D paramGraphics2D)
  {
    this.m = paramGraphics2D.getTransform();
    this.n = paramGraphics2D;
    pc localpc = kg.a(paramGraphics2D);
    if (((ld.E) || (localpc != null)) && (localpc.a() != null))
    {
      paramGraphics2D.setTransform(localpc.a());
      if (!ld.D) {}
    }
    else
    {
      Point2D localPoint2D = this.g.S();
      double d1 = 1.0D / this.g.M();
      paramGraphics2D.translate(localPoint2D.getX(), localPoint2D.getY());
      paramGraphics2D.scale(d1, d1);
    }
  }
  
  protected void i(Graphics2D paramGraphics2D)
  {
    boolean bool = ld.E;
    if (!bool) {
      if ((this.m != null) && ((bool) || (paramGraphics2D == this.n)))
      {
        paramGraphics2D.setTransform(this.m);
        if (!ld.D) {
          return;
        }
      }
    }
    Point localPoint = this.g.R();
    double d1 = this.g.M();
    paramGraphics2D.scale(d1, d1);
    paramGraphics2D.translate(-localPoint.getX(), -localPoint.getY());
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.jb

 * JD-Core Version:    0.7.0.1

 */